Expand the Multi value drop down box

Hello,
Does anyone have a method to adjust the size of the multi-value drop down box?

Thank you
SystemAdmin - Mon Dec 14 14:58:18 EST 2009

Re: Expand the Multi value drop down box
doors36677 - Tue Dec 15 06:59:03 EST 2009

Attached is a demo that shows one way to make the multiList wider using a label.
 

//Demo
/*Demo to show how to make multiList wider*/
DB attrShow = create "Attributes" 
string attrNames[100] 
DBE attrList = multiList(attrShow, "Attributes:",5, attrNames ,0) 
label(attrShow,"This line is just to make the above multiList much much wider.")
realize attrShow

Re: Expand the Multi value drop down box
llandale - Tue Dec 15 11:51:22 EST 2009

I can see no way of dynamically increasing the depth of a list or multiList DBE, once the dialog is realized. That makes sense since 'relealize' defines the dimensions of the box and its elements. You can, however, adjust the DBE depth when the user makes the dialog itself taller or shorter. Thus, if the user wants to see more options she can manually drag the bottom of the box.

string List[4]
DB db = create("test")
 
DBE dbe = list(db, "Test", 4, List, 0)
label(db, "Status")
realize db
if (confirm("Adjust List with Dialog?"))
   setExtraHeightShare(dbe, 1.0)
show db


Run code, first time cancel the 2nd time confirm. Adjust depth of both boxes.

The big DBEs are by default attached to their surroundings, often the edge of the 'form'. So if you put only one list on a line, its automatically attached to the edges and will adjust size. But if you perhaps put two lists of a particular width on the line, you can set the right most one dbeRight ->"right" ->"unattached", then use setExtraWidthShare(dbLeft, 0.5);setExtraWidthShare(dbRight, 0.5), and they will expand and contract proportionally when the width of the box is changed. If you change "0.5" to "0.7", then expand the box, the DBEs will expand too fast. Be sure your ratios add up to 1.0.

 

 

  • Louie

 

 

Re: Expand the Multi value drop down box
Doug.Zawacki - Wed Dec 30 13:04:06 EST 2009

Hi,
One method I use to adjust the size is to enclose the listbox inside a Frame. Constraining the listbox "inside" the frame.